Skip to main content

Deploy the App

  • open up the terminal window and type ./mvnw clean package (recall: the Spring Boot project comes with a Maven wrapper mvnw in the photoz-clone/ folder)
    • make sure that you have set up your JAVA_HOME environment variable to the exact same java version that you are building your project with, otherwise you might run into problems
      • JAVA_HOME setup in linux
        • this is not necessary, in Ubuntu 20.04 ./mvnw clean package will build successfully without setting the JAVA_HOME variable
tip

If you are using IntelliJ you could just click on "Maven" (right side of IntelliJ) → photoz-clone → Lifecycle → package (double click).

  • then, after the build succeeds, inside the target/ folder (Maven's build/ folder) you will have a .jar file (which has a file size of a couple of MB)
  • now, you can simply take this .jar file, put it on a server, on an arbitrary machine or anywhere you want to and simply run it with java -jar ./photoz-clone-0.0.1-SNAPSHOT.jar - that is deployment